	CHARACTER*75 A(35)
	DIMENSION N(35)
	DATA N/1,6,2,14,11,12,3,4,22,27,23,21,26,13,15,10,9,8,
	1      19,17,5,20,25,24,7,16,18,28,29,30,31,32,33,34,35/
	I=1
10	READ(1,1,END=50)A(I)
1	FORMAT(A)
	I=I+1
	GO TO 10
50	I=I-1
	IF(I.EQ.35)THEN
		DO 15 K=1,35
		WRITE(2,2)A(K),N(K)
2	FORMAT(A,1X,I2)
15		CONTINUE
		END IF
	IF(I.NE.35)THEN
		DO 16 K=1,I
		WRITE(2,2)A(K),K
16		CONTINUE
		END IF
	STOP
	END
